// 基于template/src/widgets/\{{appEntities}}/\{{ctrls@FORM}}-form/\{{spinalCase ctrl.codeName}}-form-vo.ts.hbs生成
import { ControlVOBase } from '@/core';

export class {{pascalCase ctrl.name}}ControlVO extends ControlVOBase {
  constructor(data: any) {
    //  表单预置字段
    data.srfwfmemo = data['srfwfmemo'] ? data['srfwfmemo'] : '';
    data.srffrontuf = data['srffrontuf'] ? data['srffrontuf'] : '';
    super(data);
    //  表单自持属性
    this.$ownKeys = [{{#each ctrl.psDEFormItems as | item |}}'{{lowerCase item.id}}'{{#unless @last}}, {{/unless}}{{/each}}];
  }
{{#each ctrl.psDEFormItems as | item |}}
  {{#if item.psAppDEField}}
  get {{lowerCase item.id}}() {
    return this.$DO.{{lowerCase item.psAppDEField.codeName}};
  }
  set {{lowerCase item.id}}(value: any) {
    this.$DO.{{lowerCase item.psAppDEField.codeName}} = value;
  }
  {{/if}}
{{/each}}
{{#each ctrl.psDEFormItems as | item |}}
  {{#and (eq item.psAppDEField null) (neq item.id 'srfuf')}}
    {{#eq item.id 'srfwfmemo'}}
  //  预置工作流字段
  get srfwfmemo() {
    return this.$DO.srfwfmemo;
  }

  set srfwfmemo(value: any) {
    this.$DO.srfwfmemo = value;
  }
    {{else if (eq item.id 'srffrontuf')}}
  //  预置前端标识字段
  get srffrontuf() {
    return this.$DO.srffrontuf;
  }

  set srffrontuf(value: any) {
    this.$DO.srffrontuf = value;
  }
    {{else}}
  {{lowerCase item.id}}: any;
    {{/eq}}
  {{/and}}
{{/each}}
}